package com.smart.model.convert;

import com.smart.model.dtomapper.ProjectTempTaskDtoMapper;
import com.smart.model.domain.ProjectTempTaskDO;
import com.smart.model.vo.ProjectTempTaskVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class ProjectTempTaskConvert {

    public static List<ProjectTempTaskVO> buildProjectTempTaskVoList(List<ProjectTempTaskDO> projectTempTaskDOList) {
        if (CollectionUtils.isEmpty(projectTempTaskDOList)) {
            return Lists.newArrayList();
        }
        List<ProjectTempTaskVO> projectTempTaskVOList = new ArrayList<>();
        for (ProjectTempTaskDO projectTempTaskDO : projectTempTaskDOList) {
            projectTempTaskVOList.add(ProjectTempTaskDtoMapper.INSTANCE.do2VO(projectTempTaskDO));
        }

        return projectTempTaskVOList;
    }
}
